package class_;

import javax.naming.Name;
import java.util.Arrays;

public class FanXing<E extends Comparable<E>> {
    public E findMax(E[] array){
        E max = array[0];
        for (int i = 0; i < array.length; i++) {
            if (max.compareTo(array[i]) < 0){
                max = array[i];
            }
        }
        return max;
    }

    public static void main(String[] args) {
        FanXing<Integer> fanXing = new FanXing<Integer>();
        Integer[] array = {1,4,2,10,5,7,19};
        Integer integer = fanXing.findMax(array);
        System.out.println(integer);

    }
}
